package com.www.demo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * 定时任务服务类
 */
@Service
public class JobService {
    @Autowired
    private TestService testService;

    /**
     * 定时任务测试
     */
    @Scheduled(fixedDelay = 1000)
    public void job(){
        testService.hello("client (1):"+new Date().toLocaleString());

    }
}
